tests.tree = new function() {
    return {
      onchange : function(node,tree) {
        var nodeData = $(node).metadata();
        $('#create-form').show();
        $('#create-form-file').val(nodeData.filepath);
        if(nodeData.isDir) {
          $('#create-form-existent-class').val('');
          $('#create-form-create-class-name').html(nodeData.filepath);
          $('#create-form-create-class').show();
          $('#create-form-create-test-class-name').html('');
          $('#create-form-create-test-prefix').html('and ');
        }
        else {
          $('#create-form-existent-class').val('1');
          $('#create-form-create-test-prefix').html('');
          $('#create-form-create-test-class-name').html(' on ' + nodeData.filename);
          $('#create-form-create-class').hide();
        }
      }
    };
}